import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '名称',
    align: 'center',
    dataIndex: 'name',
  },
  {
    title: '广告类型',
    align: 'center',
    dataIndex: 'spaceType_dictText',
  },
  {
    title: '广告位ID',
    align: 'center',
    dataIndex: 'spaceId',
  },
  {
    title: '状态',
    align: 'center',
    dataIndex: 'spaceState',
  },
  {
    title: '日内平均收益',
    align: 'center',
    dataIndex: 'spaceArpu',
  },
];
//查询数据
export const searchFormSchema: FormSchema[] = [];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '名称',
    field: 'name',
    component: 'Input',
  },
  {
    label: '类型',
    field: 'spaceType',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: 'spaceType',
      placeholder: '请选择类型',
      stringToNumber: true,
    },
  },
  {
    label: '广告位ID',
    field: 'spaceId',
    component: 'Input',
  },
  {
    label: '广告位状态',
    field: 'spaceState',
    component: 'JDictSelectTag',
    componentProps: {
      dictCode: 'status',
      placeholder: '请选择广告位状态',
      stringToNumber: true,
    },
  },
  {
    label: '',
    field: 'id',
    component: 'Input',
    show: false,
  },
];

// 高级查询数据
export const superQuerySchema = {
  name: { title: '名称', order: 0, view: 'text', type: 'string' },
  spaceType: { title: '类型', order: 1, view: 'number', type: 'number' },
  spaceId: { title: '广告位ID', order: 2, view: 'text', type: 'string' },
  spaceState: { title: '状态', order: 3, view: 'number', type: 'number' },
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[] {
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}